package quick.frame.service.base;

import android.app.Application;
import android.content.Context;

import quick.frame.core.app.BaseApplication;
import quick.frame.core.app.Configurator;
import quick.frame.core.app.Quick;
import quick.frame.service.contains.HttpMethodContains;
import quick.frame.service.test.SPDInteceptor;


public class QuickApplication extends BaseApplication {

	@Override
	public void onCreate() {
		
		super.onCreate();
		Configurator.getInstance().withInterceptor(new SPDInteceptor(HttpMethodContains.REQUEST_QUERY_URL,HttpMethodContains.LOGIN_QUERY_URL,HttpMethodContains.DOWN_URL));
		//Utils.init(this); "192.168.20.206:8080/spd-web/"+
		/*DatabaseManager.getInstance().init(this);
		if(DatabaseManager.getInstance().getDao().load(1L) != null){
			Configurator.put(ConfigKeys.SERVER_URL,DatabaseManager.getInstance().getDao().load(1L).getServerUrl());
		}*/

		//先取得默认的异常处理handler
		//Configurator.defaultuncaughtexceptionhandler = Thread.getDefaultUncaughtExceptionHandler();
		//Thread.setDefaultUncaughtExceptionHandler(BaseUncaughtExceptionHandler.getInstance());
		//SpUtil.getInstance();
	//	Configurator.getLoginBean().setUrl(SpUtil.getSharePerference(this).getString(SpUtil.SERVER_URL,"192.168.20.206/spd-web"));


	}
	/*@Override
	protected void attachBaseContext(Context base) {
		super.attachBaseContext(base);
	}*/
	

}
